import com.itcast.dao.Userdao;
import com.itcast.pojo.User;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.lang.annotation.Target;
import java.util.List;


@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:ApplicationContext-dao.xml")
public class maintest {
    @Autowired
    private Userdao userdao;
    @Test
    public void show(){
        List<User> findall = userdao.findall();
        System.out.println(findall);
    }
}
